package exercise.day05;

public class MultiTable {
    public static void main(String[] args) {
//        for(int i=0;i<=9;i++){
//            for(int a=1;a<=i;a++){
//                System.out.print(a+"*"+i+"="+a*i+"\t");
//            }
//            System.out.println();
//        }
//        System.out.println("-----------------");
//        for(int a=1;a<=9;a++){
//            for(int b=9;b>=a;b--){
//                System.out.print(a+"*"+b+"="+a*b+"\t");
//            }
//            System.out.println();
//        }

        System.out.println("---------------");
        for (int a = 1; a <= 9; a++) {
            for (int b = 9; b >= a; b--) {
                System.out.print(a + "*" + b + "=" + a * b + "\t");
            }
            System.out.println();
        }

        for (int a = 9; a >= 1; a--) {
            for (int b = a; b >= 1; b--) {
                    System.out.print(a + "*" + b + "=" + a * b + " \t");
            }
            System.out.println();
        }
    }
}
